package lyl.my;

import java.util.ArrayList;

import java.util.Collections;
import java.util.List;
public class Test{
    public static void main(String[] args) {
        //获取入参 int[][]
        int[][] nums = {{2,3,1},{6,9,2},{0,5,1}};
        int max=0;
        List<Integer> timelist = new ArrayList<>();
        for (int i = 0; i <nums.length ; i++) {
            timelist.add(nums[i][0]);
            timelist.add(nums[i][1]);
        }
        Collections.sort(timelist);
        //计算不同时间下同时运行的任务有几个，分别占用多少服务器
        for (int i = 0; i <timelist.size(); i++)
        {
            if(i>0&&timelist.get(i)==timelist.get(i-1)) {
                continue;
            }
            int temp=0;
            for (int j = 0; j <nums.length ; j++) {
                if(timelist.get(i)>=nums[j][0]&&timelist.get(i)<=nums[j][1]) {
                    temp+=nums[j][2];
                }
                max=Math.max(max,temp);
            }
        }
        System.out.println(max);
        Character ch = 'c';
        System.out.println( Character.isDigit(ch));
    }
}